/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.bry.fullscreen;

import java.awt.Frame;
import javax.swing.Action;
import javax.swing.SwingUtilities;
import org.openide.filesystems.FileUtil;
import org.openide.modules.ModuleInstall;
import org.openide.windows.WindowManager;

public class Installer extends ModuleInstall {

	@Override
	public void restored() {
		WindowManager.getDefault().invokeWhenUIReady(new Runnable() {

			@Override
			public void run() {
//				SwingUtilities.invokeLater(new Runnable() {
//
//					@Override
//					public void run() {
//						Frame mainWindow = WindowManager.getDefault().getMainWindow();
//						mainWindow.dispose();
//						mainWindow.setUndecorated(true);
//						mainWindow.setExtendedState(Frame.MAXIMIZED_BOTH);
//						mainWindow.setVisible(true);
//					}
//				});
				FileUtil.getConfigObject("Actions/Window/org-netbeans-core-windows-actions-ToggleFullScreenAction.instance", Action.class).actionPerformed(null);
			}
		});
	}

}
